package net.csdra.libraryborrowing.domain.book;

import net.csdra.libraryborrowing.domain.EntityBase;

import javax.persistence.Column;
import javax.persistence.ElementCollection;
import javax.persistence.Entity;
import java.util.ArrayList;
import java.util.List;

/**
 * Created by msf on 2017/9/29.
 * 书籍信息
 * metaId 关联Categories的Id
 */
@Entity
public class BookInfo extends EntityBase {
    //图书名称
    String name;
    String author;
    //TODO
    @Column(unique = true)
    String isbn;
    //图书简介
    String info;
    //封面
    String cover;
    //副本总数
    int copyCount;
    //在馆副本总数
    int remainNumber;
    @ElementCollection
    List<String> categoriees = new ArrayList<>();

    public List<String> getCategoriees() {
        return categoriees;
    }

    public void setCategoriees(List<String> categoriees) {
        this.categoriees = categoriees;
    }

    public int getCopyCount() {
        return copyCount;
    }

    public void setCopyCount(int copyCount) {
        this.copyCount = copyCount;
    }

    public int getRemainNumber() {
        return remainNumber;
    }

    public void setRemainNumber(int remainNumber) {
        this.remainNumber = remainNumber;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getIsbn() {
        return isbn;
    }

    public void setIsbn(String isbn) {
        this.isbn = isbn;
    }

    public String getInfo() {
        return info;
    }

    public void setInfo(String info) {
        this.info = info;
    }

    public String getCover() {
        return cover;
    }

    public void setCover(String cover) {
        this.cover = cover;
    }

    public String getAuthor() {
        return author;
    }

    public void setAuthor(String author) {
        this.author = author;
    }
}
